home *** CD-ROM | disk | FTP | other *** search
- blt2demo.exe 9-Sep-1995
-
- To run the demo, do
-
- C>blt2demo
-
- and select from the menu.
-
- Test #9 requires an FPU. Details at CX09.C below.
-
-
- ///// Overview
-
- All the following are modules run from BLT2DEMO.C (main).
- Just startup blt2demo.exe and pick the number of the test to run.
- Easy, and pretty fast.
-
-
- ///// CX01.C - REINDEX blaze of speed
-
- To run cx01.c, just start it up from the command line. It asks
- for run options (display data, thread reindex, size of data set).
- Default is for no display of each record, yes thread, and 1 data
- record. You can run up to 10 million data record (less 1), but
- that could take an hour. 50,000 is a decent test (about a minute).
- Ctrl-C is acceptable if you can't wait for a regular ending. See
- the .c for details. On this iDX4/100 machine I can reindex 500,000
- (half million) in 90 seconds, and 100,000 in 12 seconds. Fast.
-
-
- ///// CX02.C - Use b-tree functionality of Bullet with your own data files
-
- For cx02.c, it's similar in operation, but uses no DBF data file.
- It's just an example of the external data file mode that let's you
- use whatever data file you want (or none at all if the 32-bit key
- data item is all the data storage you need). The key store speed is
- not as fast as the reindexing used in cx01.exe, but it still should
- be fast enough. Key access is just as fast.
-
-
- ///// CX03.C - atomic INSERT into data/index files
-
- For cx03.c, it's similar to the others, but does the data record
- store and the key insert in a single. It can manage up to 512 differnt
- files at the same time, with the single call. Any error in any of the
- transaction part has Bullet backout all changes made, automatically.
- The 512 files can be in any combination, up to 256 index and 256 data,
- even multiple inserts on the same file.
-
-
- ///// CX04.C - atomic UPDATE of data/index files
-
- For cx04.c, it's...similar to cx03.exe but in addition to performing
- inserts, it changes the database with UPDATE_XB. The action of changing
- only the data record results in the key in all related index files to
- also be updated. As with INSERT_XB, UPDATE_XB is transaction-based, so
- upon any error during the call, any changes made to the database are
- backed-out, and the original state restored. Since so much more needs
- to be done for an update I recommend you limit the number to a few
- thousand. 80k updates took 770 seconds here (that still averages over
- 100 updates per second). 40k updates took 202 seconds, 20k updates
- took 99 seconds, and 10,000 updates to 43 seconds.
-
- Be aware that an update does a lot of work: 1) the initial record is
- read from the .c program (and modified in memory), 2) and then a call
- to Bullet UPDATE_XB for each number you requested. An update performs
- (and in this test case, performs all of the following) 3) a disk read
- to get the original record, 4) builds a key based on that, 5) builds a
- key based on the modified record, 6) compares them, if different,
- 7) deletes the old key, 8) writes out the new key, 9) then writes out
- the new data record. That's for each UPDATE_XB, so think about that
- when you enter the "number of records" to do.
-
-
- ///// CX05.C - table joins for multiple view of database
-
- For cx05.c, it's more of a real-world example than the previous examples
- in that it does some really useful work, and doesn't really care how fast
- it's done (you already know it's as fast as they come). This example
- creates a 5-file database: two data files and three index files. After
- inserting the data, three different view are done on the database.
-
-
- ///// CX06.C - view table with memo file access
-
- cx06.exe is based somewhat on cx05, but instead of a second data file,
- this example creates and accesses a memo file. The memo file is pretty
- much a free-form, any-size-goes data file. Any DBF record may contain
- a memo file memo, or even several (odd, but possible nevertheless). The
- format used is that of dBASE IV/V.
-
-
- ///// CX07.C - file blow-out (1024 simultaneous files open)
-
- cx07.c opens up to 1024 files: 512 data and 512 index. This must be
- done in a subdirectory since the root directory is limited to much less
- than this. On an HPFS partition (2MB cache, i486), 1024 files takes about
- 20 seconds to compelete. On a FAT partition (256K cache), it takes
- about 45 seconds.
-
-
- ///// CX08.C - locks and relocks
-
- cx08.c runs through some locking examples, showing how it handles
- exclusive and shared region locks.
-
-
- ///// CX09.C - REINDEX blaze of speed, with Custom User sortFunction
-
- As cx01.c, but uses a custom floating-point sort compare function.
- Test #9 requires an FPU, so don't use unless you have a 486DX or later,
- or a 387 installed.
-
-
-